package com.yanqu.road.entity.activity.greattrade;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class GreatTradeSimpleStatus {

    //商途是否结束
    boolean tradeFinish = true;

    //当前年限
    int curYear;

    //仓储容量
    int bagCap;

    //称号
    int title;

    //年龄
    int age;

    //健康值
    int health;

    //资产
    String assets = "0";

    //上一年资产
    String lastAssets = "0";

    //最高资产
    String maxAssets = "0";

    //现银
    String silver = "0";

    //名望
    long prestige;
    //名望等级
    int prestigeLv;

    //出生
    int birth;

    //可用外出遭遇次数(每日加1)
    int outTimes;

    //累计增加的外出次数（每年上限5）
    int totalAddOutTimes;

    //每日重置时间
    int dayResetTime;

    //医馆健康恢复次数
    int healthTimes;

    //外出自选次数
    int eventSelectTimes;

    //增加健康值上限
    int exMaxHealth;

    //随机事件
    int randomEventId;

    //盐场监管风险
    int risk;

    //宴会次数
    int banquetTimes;

    //行商卖出次数
    int sellTimes;

    //是否患病
    boolean ill;

    //当前外出次数
    int totalOutTimes;

    //慧眼识珠 成就  连续开宝评价次数（珍惜或者至宝）
    int kbpjTimes;

    //承包盐场
    List<Integer> saltWorks = new ArrayList<>();

    //外出事件
    List<Integer> areaEvents = new ArrayList<>();

    //产业破产次数
    int brokenTimes;

    //行销商品总额
    //1:产业；2：盐场；其他：行商商品
    Map<Integer, String> sellMoney = new HashMap<>();

    //0：正常；1：受打击；2：患病
    int status;

    //开启商贸时间
    int startTime;

    //购买背包次数
    int buyBayCapTimes;

    //行商盈利年限
    int yingLi;
    //行商当年卖出盈利
    String gooodsAddSum = "0";

    //行商盈利
    private String goodsProfit = "0";
    //产业盈利
    private String industryProfit = "0";
    //事件盈利
    private String eventProfit = "0";
    //盐场盈利
    private String saltWorksProfit = "0";

    //是否花费道具开局
    private boolean useGoods;

    //出售大涨次数
    private int sellSurgeTimes;

  public GreatTradeSimpleStatus() {
    }

    public boolean isTradeFinish() {
        return tradeFinish;
    }

    public void setTradeFinish(boolean tradeFinish) {
        this.tradeFinish = tradeFinish;
    }

    public int getCurYear() {
        return curYear;
    }

    public void setCurYear(int curYear) {
        this.curYear = curYear;
    }

    public int getBagCap() {
        return bagCap;
    }

    public void setBagCap(int bagCap) {
        this.bagCap = bagCap;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public String getAssets() {
        return assets;
    }

    public void setAssets(String assets) {
        this.assets = assets;
    }

    public String getLastAssets() {
        return lastAssets;
    }

    public void setLastAssets(String lastAssets) {
        this.lastAssets = lastAssets;
    }

    public String getMaxAssets() {
        return maxAssets;
    }

    public void setMaxAssets(String maxAssets) {
        this.maxAssets = maxAssets;
    }

    public String getSilver() {
        return silver;
    }

    public void setSilver(String silver) {
        this.silver = silver;
    }

    public long getPrestige() {
        return prestige;
    }

    public void setPrestige(long prestige) {
        this.prestige = prestige;
    }

    public int getBirth() {
        return birth;
    }

    public void setBirth(int birth) {
        this.birth = birth;
    }

    public int getOutTimes() {
        return outTimes;
    }

    public void setOutTimes(int outTimes) {
        this.outTimes = outTimes;
    }

    public int getTotalAddOutTimes() {
        return totalAddOutTimes;
    }

    public void setTotalAddOutTimes(int totalAddOutTimes) {
        this.totalAddOutTimes = totalAddOutTimes;
    }

    public int getDayResetTime() {
        return dayResetTime;
    }

    public void setDayResetTime(int dayResetTime) {
        this.dayResetTime = dayResetTime;
    }

    public int getHealthTimes() {
        return healthTimes;
    }

    public void setHealthTimes(int healthTimes) {
        this.healthTimes = healthTimes;
    }

    public int getEventSelectTimes() {
        return eventSelectTimes;
    }

    public void setEventSelectTimes(int eventSelectTimes) {
        this.eventSelectTimes = eventSelectTimes;
    }

    public int getExMaxHealth() {
        return exMaxHealth;
    }

    public void setExMaxHealth(int exMaxHealth) {
        this.exMaxHealth = exMaxHealth;
    }

    public int getRandomEventId() {
        return randomEventId;
    }

    public void setRandomEventId(int randomEventId) {
        this.randomEventId = randomEventId;
    }

    public int getRisk() {
        return risk;
    }

    public void setRisk(int risk) {
        this.risk = risk;
    }

    public int getBanquetTimes() {
        return banquetTimes;
    }

    public void setBanquetTimes(int banquetTimes) {
        this.banquetTimes = banquetTimes;
    }

    public int getSellTimes() {
        return sellTimes;
    }

    public void setSellTimes(int sellTimes) {
        this.sellTimes = sellTimes;
    }

    public boolean isIll() {
        return ill;
    }

    public void setIll(boolean ill) {
        this.ill = ill;
    }

    public int getTotalOutTimes() {
        return totalOutTimes;
    }

    public void setTotalOutTimes(int totalOutTimes) {
        this.totalOutTimes = totalOutTimes;
    }

    public int getKbpjTimes() {
        return kbpjTimes;
    }

    public void setKbpjTimes(int kbpjTimes) {
        this.kbpjTimes = kbpjTimes;
    }

    public List<Integer> getSaltWorks() {
        return saltWorks;
    }

    public void addSaltWorks(int id){
        if(!saltWorks.contains(id)){
            saltWorks.add(id);
        }
    }

    public void setSaltWorks(List<Integer> saltWorks) {
        this.saltWorks = saltWorks;
    }

    public List<Integer> getAreaEvents() {
        return areaEvents;
    }

    public void setAreaEvents(List<Integer> areaEvents) {
        this.areaEvents = areaEvents;
    }

    public void addAreaEvents(int eventId){
        if(!areaEvents.contains(eventId)){
            areaEvents.add(eventId);
        }
    }

    public int getBrokenTimes() {
        return brokenTimes;
    }

    public void setBrokenTimes(int brokenTimes) {
        this.brokenTimes = brokenTimes;
    }

    public Map<Integer, String> getSellMoney() {
        return sellMoney;
    }

    public void addSellMoney(int goodsId, BigInteger price){
        String history = getSellMoney().getOrDefault(goodsId, "0");
        getSellMoney().put(goodsId, price.add(new BigInteger(history)).toString());
    }

    public void setSellMoney(Map<Integer, String> sellMoney) {
        this.sellMoney = sellMoney;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getStartTime() {
        return startTime;
    }

    public void setStartTime(int startTime) {
        this.startTime = startTime;
    }

    public int getPrestigeLv() {
        return prestigeLv;
    }

    public void setPrestigeLv(int prestigeLv) {
        this.prestigeLv = prestigeLv;
    }

    public int getBuyBayCapTimes() {
        return buyBayCapTimes;
    }

    public void setBuyBayCapTimes(int buyBayCapTimes) {
        this.buyBayCapTimes = buyBayCapTimes;
    }

    public int getYingLi() {
        return yingLi;
    }

    public void setYingLi(int yingLi) {
        this.yingLi = yingLi;
    }

    public String getGooodsAddSum() {
        return gooodsAddSum;
    }

    public void setGooodsAddSum(String gooodsAddSum) {
        this.gooodsAddSum = gooodsAddSum;
    }

    public String getGoodsProfit() {
        return goodsProfit;
    }

    public void setGoodsProfit(String goodsProfit) {
        this.goodsProfit = goodsProfit;
    }

    public String getIndustryProfit() {
        return industryProfit;
    }

    public void setIndustryProfit(String industryProfit) {
        this.industryProfit = industryProfit;
    }

    public String getEventProfit() {
        return eventProfit;
    }

    public void setEventProfit(String eventProfit) {
        this.eventProfit = eventProfit;
    }

    public String getSaltWorksProfit() {
        return saltWorksProfit;
    }

    public void setSaltWorksProfit(String saltWorksProfit) {
        this.saltWorksProfit = saltWorksProfit;
    }

    public boolean isUseGoods() {
        return useGoods;
    }

    public void setUseGoods(boolean useGoods) {
        this.useGoods = useGoods;
    }

    public int getSellSurgeTimes() {
        return sellSurgeTimes;
    }

    public void setSellSurgeTimes(int sellSurgeTimes) {
        this.sellSurgeTimes = sellSurgeTimes;
    }
}
